package analysis;

import static org.junit.Assert.*;

import java.io.File;

import model.*;

import org.junit.Test;


public class AnalysisTest {
  
  String pathToP1 = "."+File.separator+"test-programs"+File.separator+
  	"PackInPack_lotsOfClassesInSinglePack"+File.separator+"bin";
  String pathToP2 = "."+File.separator+"test-programs"+File.separator+
  	"DefaultPackage"+File.separator+"bin";
  String pathToHashKnowledgement = pathToP1 +File.separator+"pack1"+File.separator+
  	"rapidinho"+File.separator+"HashKnowlegment.class";
  
  
  /* make a new .class file to run the test...
  @Test
  public void equalsSysRoots(){
    SysRoot root = SysAnalysis.initialModel(pathToP1);
    SysRoot root1 = new SysRoot();
    SysPackage p1 = new SysPackage("pack1");
    p1.add(new SysPackage("rapidinho"));
    root1.add(p1);
    assertTrue(root.equals(root1));
    
  }
  
  @Test
  public void sameSysRoot(){
    SysRoot root = SysAnalysis.initialModel(pathToP1);    
    SysRoot root1 = new SysRoot();
    SysPackage p1 = new SysPackage("pack1");
    root1.add(p1);    
    assertTrue(root.equals(root1));
  }
  */
  
  @Test 
  public void defaultPackage() {
    SysRoot root = SysAnalysis.initialModel(pathToP2);
    SysRoot toCompare = new SysRoot();
    SysPackage d = new SysPackage("(default package)");
    SysPackage j = new SysPackage("java");
    toCompare.add(d);
    toCompare.add(j);
    for(SysPackage p : root.getPackages()){
    	System.out.println(p);
    }
    assertTrue(root.equals(toCompare));
  }
  
  
  
  
}
